
<template>
  <div class="wh100 resize-table-container">
    <a-table class="a-base-table" :columns="table.columns" :pagination="false" :data-source="table.data" :scroll="table.scroll" bordered>
    </a-table>
    <div class="a-button-bar">
      <a-button>取消</a-button>
      <a-button type="primary">保存</a-button>
    </div>
  </div>
</template>
<script>
const data = [];
for (let i = 0; i < 12; i++) {
  data.push({
    key: i,
    index: i + 1,
    beginTime: `Edrward ${i}`,
    endTime: 32
  });
}

import table from "@/mixins/table";
export default {
  mixins: [table],
  data() {
    return {
      table: this.tableInit({
        data,
        columns: [
          {
            title: "项目",
            width: 200,
            dataIndex: "index"
          },
          { title: "最大长度", dataIndex: "xxx", width: 100 },
          { title: "单级最大长度", dataIndex: "xx", width: 100 },
          {
            title: "第1级",
            dataIndex: "endTime1",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime1";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第2级",
            dataIndex: "endTime2",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime1";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第3级",
            dataIndex: "endTime3",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime1";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第4级",
            dataIndex: "endTime4",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime1";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第5级",
            dataIndex: "endTime5",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime5";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第6级",
            dataIndex: "endTime6",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime5";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第7级",
            dataIndex: "endTime7",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime5";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第8级",
            dataIndex: "endTime8",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime5";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          },
          {
            title: "第9级",
            dataIndex: "endTime9",
            width: 80,
            customRender: (text, record) => {
              const key = "endTime5";
              const change = e => {
                record[key] = e.target.value;
              };
              return <a-input value={record[key]} onChange={change}></a-input>;
            }
          }
        ]
      })
    };
  },
  methods: {}
};
</script>
 
